<!-- eslint-disable vue/multi-word-component-names -->
<template>
    <!-- <el-container justify="center" > -->
    <el-dialog :visible="showingProperty" @close="closeFn">

    <div class="table-container">
        <!-- <el-table :data="PropertyList">
          <el-table-column width="180">
            <template>
              <i class="el-icon-time"></i>
            </template>
          </el-table-column>
        </el-table> -->
      <!-- <el-card class="box-card"></el-card> -->
      <div class="header">
        <img src="@/assets/components/芜湖.png" alt="">
        <span>房产列表</span>
      </div>
      <div class="content">
        <ul v-for="v in propertyList" :key="v.title">
          <li>
            <!-- <div class="img"> -->

            <img :src="v.image" alt="" v-imgErr="require('@/assets/components/1.png')">
            <!-- </div> -->
            <div class="details">
              <h3>
              {{v.title}}
              </h3>
              <p>
                {{v.desc}}
              </p>
            </div>
          </li>
        </ul>
      </div>
    </div>
    </el-dialog>
    <!-- </el-container> -->
</template>

<script>
// import { getPropertyList, getPropertyListTotal } from '@/api/property'
export default {
  props: {
    showingProperty: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
      propertyList: [],
      searchQuary: {
        _limit: 2,
        _start: 0,
        titleContains: '',
        agent: 0,
        category: 0
      },
      total: 0
    }
  },
  created () {
    // this.getPropertyList(this.searchQuary)
  },
  methods: {
    // async getPropertyList (quary) {
    //   this.searchQuary.agent = this.tagId
    //   const res = await getPropertyList(quary)
    //   this.propertyList = res.data
    //   const val = await getPropertyListTotal(quary.titleContains)
    //   this.total = val.data
    //   console.log('propertyList', this.tagId)
    //   console.log('propertyTotal', val.data)
    // },
    closeFn () {
      this.$emit('update:showingProperty', false)
    }
  }
}
</script>

<style scoped lang="scss">
*{
  // margin: 0;
  // padding: 0;
  box-sizing: border-box;
}
  .table-container{
    display: flex;
    flex-direction: column;
    // align-items: center;
    justify-content: center;
    width: 1000px;
    .header{
      display: flex;
      // height: 24px;
      img {
        display: inline-block;
        height: 24px;
      }
      span {
        font-size: 20px;
        line-height: 20px;
        color: #f8ac3b;
      }
    }
    .content{
      ul{
        padding: 0;
        list-style: none;
        border: 1px solid #000;
        width: 1000px;
        li {
          display: flex;
          justify-content: space-between;
          align-items: center;
          img{
            height: 200px;
          }
          .details {
            display: flex;
            flex-direction: column;
            justify-content: center;
            line-height: 24px;
            border-left: 1px solid #000;
            width:100%;
            h3 {
              margin: 8px 0;
            }
            p{
              margin: 8px 0;
            }
          }
        }
      }
    }
  }
  // .el-table {
  //   width: 1000px;
  // }
  // .el-card {
  //   width: 1000px;
  // }
</style>
